﻿<%@ Control Language="C#" AutoEventWireup="true" CodeFile="SetTopChoose.ascx.cs"
    Inherits="CMS_Control_SetTopChoose" %>

<script type="text/javascript" src="../../JQuery/jquery-1.3.2.min.js"></script>

<script src="../js/jquery-mztree/jquery.thickbox.js" type="text/javascript"></script>

<link rel="stylesheet" href="../js/jquery-mztree/thickbox.css" type="text/css" media="screen" />

<script type="text/javascript" language="javascript">

    function clsbox() {
        var e = document.getElementById("selarea");
        var e1 = document.getElementById("<%=hidarea1.ClientID %>");
        var t = document.getElementById("<%=choose.ClientID %>");
        var h = document.getElementById("hidarea");

        t.value = "目录 >> " + e.innerHTML;
        h.value = e1.value;

        tb_remove();
    }

    function onboxclick() {

        var h = document.getElementById("<%=hidarea1.ClientID %>");
        if (h.value != '') {
            tree.Click(h.value);
        };

    }

    function L(id) {
        var e = document.getElementById("selarea");
        var e1 = document.getElementById("<%=hidarea1.ClientID %>");
        var t0 = "", t1 = "", t2 = "", t3 = "";
        var n;

        n = tree.currentNode;

        t0 = n.T;
        e.innerHTML = t3 + t2 + t1 + t0;
        e1.value = id;
    }

    function removetop() {
        var e1 = document.getElementById("<%=hidarea1.ClientID %>");
        var t = document.getElementById("<%=choose.ClientID %>");
        t.value = "请选择精华目录...";
        e1.value = "-1";
        tb_remove();
        
    }

</script>

<script language="JavaScript" src="../js/jquery-mztree/MzTreeView12.js"></script>

<style>
    A.MzTreeview
    {
        font-size: 12px;
        padding-left: 5px;
        color: blue;
    }
</style>
<div align="left">
    <input name="hidarea" id="hidarea" type="hidden" value="" />
    <input alt="#TB_inline?height=355&width=300&inlineId=after&modal=true" title="" class="thickbox"
        type="button" value="请选择精华目录..." onclick="onboxclick();return false;" id="choose"
        runat="server" />
</div>
<div id="after" align="left" style="display: none; background: #FFFFEE; font-size: 12px;
    cursor: default;">
    <button id='selareayes' onclick='clsbox()' runat="server">
        确定</button>
    &nbsp;&nbsp;&nbsp;&nbsp;
    <button id='selareano' onclick='tb_remove()'>
        取消</button>
        <button id='Button1' onclick='removetop()' runat="server">
        移除精华</button>
    <div style='border: 1px dotted #cccccc; background: #ffffff; line-height: 2em'>
        精华目录 >>  <span id='selarea'></span>
        <input name="hidarea1" id="hidarea1" type="hidden" value="" runat="server" />
    </div>
    <div id='areatree' style="width: 300; height: 290px; background: #FFFFEE; overflow: auto">
    </div>
</div>

<script language="JavaScript">
    function Init() {
        tree = new MzTreeView("tree");
        tree.setIconPath("../js/jquery-mztree/images/"); //可用相对路径
        SetValue(tree);
        tree.setURL = "#selarea";
        document.getElementById("areatree").innerHTML = tree.toString();
    }

   
</script>

